An Add Display Group panel opens.
The Display Group Options panel opens so you can immediately configure the newly created display group.
detailObjects = masterObject.valueForKey(detailKey);
In your master-detail configuration, the master object is the selected Movie, and the detail key is movieRoles. When movieRoleDisplayGroup asks its data source for its MovieRole objects, the detail DisplayGroup returns the objects in the selected Movie's movieRoles vector of MovieRoles. Similarly, when MovieRole objects are inserted or deleted in movieRoleDisplayGroup, they are added and removed from the master object's movieRoles vector.
When "Fetches on load" is selected, the display group fetches its objects as soon as the component is loaded into the application. You want this feature in the MovieDetails page so that users are immediately presented with the selected movie's roles. In contrast, the Main page does not fetch on load; it shouldn't present a list of movies until the user has entered search criteria and clicked Match.
public void setSelectedMovie(EnterpriseObject newSelectedMovie) { selectedMovie = newSelectedMovie; // Add this line. movieRoleDisplayGroup.setMasterObject(newSelectedMovie); }
With this addition, whenever a user navigates to the MovieDetails page, setSelectedMovie updates the movieRoleDisplayGroup's master object so it displays the corresponding MovieRole objects.
Table of Contents
Next Section